package com.lemon.reggie.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lemon.reggie.pojo.dto.AgainOrderDTO;
import com.lemon.reggie.pojo.dto.GiveOrderDTO;
import com.lemon.reggie.pojo.dto.SubmitOrderDTO;
import com.lemon.reggie.pojo.entity.Orders;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lemon.reggie.pojo.vo.OrderPageVO;
import com.lemon.reggie.pojo.vo.OrderVO;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author Lemon
 * @since 2022-05-23
 */
public interface OrdersService extends IService<Orders> {

    /**
     * 用户下单
     * @param submitOrderDTO
     * @return void
     * @author Guannankun
     * @since 2022/8/29
     */
    void submitOrder(SubmitOrderDTO submitOrderDTO);

    /**
     * 用户订单详情分页
     * @param currentPage
     * @param pageSize
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.lemon.reggie.pojo.vo.OrderVO>
     * @author Guannankun
     * @since 2022/8/29
     */
    IPage<OrderVO> userOrderPage(Long currentPage, Long pageSize);

    /**
     * 再次下单
     * @param againOrderDTO
     * @return void
     * @author Guannankun
     * @since 2022/8/29
     */
    void againOrder(AgainOrderDTO againOrderDTO);

    /**
     * 后台订单明细分页
     * @param currentPage
     * @param pageSize
     * @param number
     * @param beginTime
     * @param endTime
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.lemon.reggie.pojo.vo.OrderPageVO>
     * @author Guannankun
     * @since 2022/8/29
     */
    IPage<OrderPageVO> orderPage(Long currentPage, Long pageSize, String number,
                                 String beginTime, String endTime);

    /**
     * 派送订单
     * @param giveOrderDTO
     * @return void
     * @author Guannankun
     * @since 2022/8/29
     */
    void giveOrder(GiveOrderDTO giveOrderDTO);

}
